﻿<html>
  <head>
    <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no'/>
    <meta name='apple-mobile-web-app-capable' content='yes' />
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta http-equiv='Content-Type' content='text/html;charset=UTF-8' />
    <link rel='apple-touch-icon-precomposed' href='${icon}'/>
    <link rel='apple-touch-startup-image' href='${icon}'/>
    <title>${title}</title>
    <style type='text/css'>
      * {
        margin: 0;
        padding: 0;
      }
      body {
        font-family: 'Times New Roman';
        background: #545454;
        text-align: center;
        font-size: 16px;
        color: #fff;
      }
      #warp {
        width: 100%;
      }
      #warp .topmenu {
        line-height: 45px;
        font-size: 20px;
        color: #e4f5fe;
        font-family: 'Times New Roman';
        text-align: center;
        background: #269ad4;
        text-shadow: 2px 2px 2px #000;
      }
      #warp .content {
        line-height: 28px;
        position: relative;
        width: 94%;
        margin: 20px auto 0;
        padding-bottom: 30px;
        color: #646464;
        background: #cfd7da;
        border: 2px solid #4d4d4d;
        -moz-border-radius: 12px;
        -webkit-border-radius: 12px;
      }
      #warp .userPic {
        margin-top: 50px;
      }
      .userPic img {
        width: 57px;
        height: 57px;
        border: 0px;
        padding: 0px 0px;
        -webkit-border-radius: 8px;
        -webkit-box-shadow: 1px 1px 1px #000;
      }
      #warp .userName {
        line-height: 24px;
        color: #668aa6;
      }
      #warp .addPic {
        margin-top: 10px;
      }
      .addPic img {
        width: 23px;
        height: 20px;
      }
      #warp .tipsText {
        margin-top: 30px;
        color: #646464;
        text-align: 10px;
        font-size: 12px;
        line-height: 14px;
      }
      #warp .tail {
        position: absolute;
        bottom: -20px;
        width: 200px;
        height: 20px;
        background: #545454;
      }
    </style>
    </style>
    <style type='text/css'>
      #warp2 {
        width: 100%;
      }
      #warp2 .topmenu {
        line-height: 45px;
        font-size: 20px;
        color: #e4f5fe;
        font-family: 'Times New Roman';
        text-align: center;
        background: #269ad4;
        text-shadow: 2px 2px 2px #000;
      }
      #warp2 .errorText {
        margin-top: 100px;
      }
    </style>
    <script type ='text/javascript'>
      if (!window.navigator.standalone) {
        window.onload = function() {
          setTimeout(scrollTo, 0, 0, 1);
        }
      }
    </script>
  </head>
  <body style='margin-left:0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px;'>
    <a id='link' href='${address}'></a>
    <div id="warp2" style='position:absolute;left: 0; top: 0;'>
      <div class='topmenu'>
        <p class='box'>
          URL桌面大头贴
        </p>
      </div>
      <div class="errorText">
        <p>
          创建URL大头贴需要JavaScript支持
        </p>
        <p>
          请在系统“设置->Safari”里面开启JavaScript
        </p>
      </div>
    </div>

    <script type='text/javascript'>
      document.getElementById("warp2").style.display = 'none';
      if (window.navigator.standalone) {
        var e = document.getElementById("link");
        var ev = document.createEvent("MouseEvents");
        ev.initEvent("click", true, true);
        e.dispatchEvent(ev);
      } else {
        var run = function() {
          location.herf = document.getElementById("link").href;
        };
        document.write("<div id='warp' style='position:absolute;left: 0; top: 0;'> <div class='topmenu'><p class='box'>URL桌面大头贴</p></div>");
        document.write("<div class='content'><p class='userPic'><img src='${icon}' onclick='run();'/></p><p class='userName'>${title}</p>");
        document.write("<div class='addPic'><p class='msg'><p>点击屏幕下方按钮</p><p><img src=''/> 或 <img src=''/></p><p class='msg'>然后选择“添加至主屏幕”</p>");
        document.write("<div class='tipsText'><hr size='2px'/><p>&nbsp;</p><p align='center'>小提示:</p><p>1.若URL的图标有所更新，请再次手动添加至桌面</p><p>2.要U删除URL，请删除对应桌面的图标</p></div>");
        document.write("<div class='tail'></div></div></div></div>");
      }
    </script>
  </body>
</html>